from django.db import models

class Body(models.Model):
    name = models.CharField(max_length=50, blank=True)
    rhoposition = models.PositiveIntegerField()
    thetaposition = models.PositiveIntegerField()
    rhospeed = models.IntegerField()
    thetaspeed = models.IntegerField()

    def __unicode__(self):
        return self.name

class Ship(Body):
    fuel = models.PositiveIntegerField()

class Planet(Body):
    discovered = models.ManyToManyField(Ship, blank=True)
